Function QueryExists2(strKey As String)

    On Error GoTo ErrorHandler
    If ActiveWorkbook.Queries(strKey).Name = strKey Then QueryExists2 = True
    Exit Function
    
ErrorHandler:
    QueryExists2 = False
    
End Function